package com.lagou.webwork.service;

import com.lagou.webwork.dao.UserDao;
import com.lagou.webwork.factory.UserFactory;
import com.lagou.webwork.model.User;

/**
 * @author sjp
 * @date 2021/5/26 18:55
 * @description
 */
public class UserService {
    private UserDao _userDao;

    public UserService() {
        //使用工厂模式创建UserDao对象
        _userDao = UserFactory.getUserDao();
    }

    public User login(User user) {
        return _userDao.login(user);
    }
}
